package com.jin.crud.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jin.crud.bean.QueryDto;
import com.jin.crud.bean.QueryUser;
import com.jin.crud.bean.SysUser;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 用户信息表 Mapper 接口
 * </p>
 *
 * @author yuxuejin
 * @since 2021-11-16
 */
public interface SysUserMapper extends BaseMapper<SysUser> {

    List<SysUser> getByPage(QueryDto param);

    int updateUser(SysUser param);

    SysUser checkUserAccountUnique(@Param("userAccount") String userAccount);

    SysUser checkPhoneUnique(@Param("phonenumber") String phonenumber);

    SysUser checkEmailUnique(@Param("email") String email);

    SysUser selectUserById(String userId);

    List<SysUser> selectAllocatedList(QueryUser param);

    List<SysUser> selectUnallocatedList(QueryUser param);

    SysUser selectUserByUserAccount(String userAccount);

    int insertUser(SysUser user);
}
